Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> body { height: 800px; width: 2000px; overflow: auto; } button { position: fixed; } </style> </head> <body> <p>Click the button to scroll the contents of body.</p> <p><strong>Tip:</strong> Click the button many times to scroll the same amount each time.</p> <button onclick="myFunction()">Scroll contents of body</button><br><br> <script> function myFunction() { document.body.scrollLeft += 30; document.body.scrollTop += 10; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_element_scrollleft4 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:29:01 GMT --> </html>
Result:
Try it Yourself - © w3schools.com